package test1;


import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Test;
import org.springframework.util.DigestUtils;

public class tes {


    @Test
    public void test1(){
        String salt = RandomStringUtils.randomAlphanumeric(10);//获取一个10位的随机字符串
        System.out.println(salt);
        String pswd = "123"+salt;
        String saltPswd = DigestUtils.md5DigestAsHex(pswd.getBytes());
        System.out.println(saltPswd);
    }


}
